package com.zatech.cgnci.project.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import java.util.List;

/**
 * @author EDY
 * @version 1.0
 * Create by 2024/12/18 14:55
 */
@Data
@ToString
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value = "CgnciApprovalConfigRoleUserDTO")
public class CgnciApprovalConfigRoleUserDTO {

    @ApiModelProperty("当前处理人节点")
    @NotBlank(message = "currentApproverNode cannot be null")
    private String currentApproverNode;

    @ApiModelProperty("任务类型")
    @NotBlank(message = "taskType cannot be null")
    private String taskType;

    @ApiModelProperty("任务类型编码")
    @NotBlank(message = "taskTypeCode cannot be null")
    private String taskTypeCode;

    @NotEmpty(message = "roleUserDTOList cannot be empty")
    @Valid
    private List<RoleUserDTO> roleUserDTOList;

    @Data
    public static class RoleUserDTO {

        @ApiModelProperty("主键id")
        private Long roleUserId;

        @ApiModelProperty("当前处理人名字")
        @NotBlank(message = "currentApproverName cannot be null")
        private String currentApproverName;

        @ApiModelProperty("当前处理人工号")
        @NotBlank(message = "currentApprover cannot be null")
        private String currentApprover;
    }

}
